<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    *{
      padding:0;
      margin:0;
    }
    .box1{
      width: 100px;
      height:100px;
      padding:10px;
      margin:20px;
      border:1px solid red
    }
    .box2{
      width: 100px;
      height:100px;
      padding:10px;
      margin:20px;
      border:1px solid green;
    }
  </style>
</head>
<body>
<div class="box1">1</div>
<div class="box2">2</div>
  <!-- 

   块级元素特点：
   1.块级元素都是独占一行
   2.块级元素支持width、height、padding、margin
   3.支持margin:auto
   4.块级标签与块级标签之间没有间隙
  -->
</body>
</html>